
<script>
import { h } from 'vue'
export default {
  name: 'XtxBread',
  render () {
    const item = this.$slots.default()

    const paramss = []

    item.forEach((a, b) => {
      if (a.type.name === 'XtxBreadItem' || a.type.name === 'Transition') {
        paramss.push(a)
        if (b < (item.length - 1)) {
          paramss.push(h('i', { class: 'iconfont icon-angle-right' }, ''))
        }
      }
    })
    return h('div', { class: 'xtx-bread' }, paramss)
  }
}
</script>

<style lang='less'>

.xtx-bread{
  display: flex;
  padding: 25px 10px;
  // 最后一个i标签隐藏
// i:nth-last-child(2){
//       display: none;
//   }
  &-item {
    a {
      color: #666;
      transition: all .4s;
      &:hover {
        color: @xtxColor;
      }
    }
  }
  i {
    font-size: 12px;
    margin-left: 5px;
    margin-right: 5px;
    line-height: 22px;
  }
}
</style>
